package com.neusoft.dibuy;

import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;

import java.io.IOException;


public class UploadFile extends MyHdfs {
    public static void main(String[] args) throws IOException {
        copyFile();
    }

    public static void copyFile() throws IOException {
        FileSystem fileSystem = FileSystem.get(conf);
        fileSystem.copyFromLocalFile(new Path("C:\\hadoop\\hello.txt"), new Path("/ttc/hello.txt"));
        String content = "Hello,shaonaiyi!\n";
        fileSystem.close();

    }

}
